package com.getpebble.android.common.model;

import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import java.util.UUID;

public class SideloadApp implements IWatchApp {
    public static final Creator<SideloadApp> CREATOR = new Creator<SideloadApp>() {
        public SideloadApp createFromParcel(Parcel source) {
            return new SideloadApp(source);
        }

        public SideloadApp[] newArray(int size) {
            return new SideloadApp[size];
        }
    };
    private AppInfo mAppInfo;
    private Uri mUri;

    public SideloadApp(AppInfo appInfo, Uri uri) throws IllegalArgumentException {
        if (appInfo == null) {
            throw new IllegalArgumentException("'AppInfo' cannot be null!");
        } else if (uri == null) {
            throw new IllegalArgumentException("'uri' cannot be null!");
        } else {
            this.mAppInfo = appInfo;
            this.mUri = uri;
        }
    }

    public AppInfo getAppInfo() {
        return this.mAppInfo;
    }

    public String getId() {
        return null;
    }

    public String getAppName() {
        return getAppInfo().getShortName();
    }

    public String getCompanyName() {
        return getAppInfo().getCompanyName();
    }

    public String getDeveloperId() {
        return null;
    }

    public String getDescription() {
        return null;
    }

    public String getPreviewImage() {
        return null;
    }

    public String getIconImage() {
        return null;
    }

    public UUID getUuid() {
        return getAppInfo().getUuid();
    }

    public boolean isLoaded() {
        return false;
    }

    public String getPbwFile() {
        return this.mUri.toString();
    }

    public int describeContents() {
        return 0;
    }

    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.mAppInfo, 0);
        dest.writeParcelable(this.mUri, 0);
    }

    private SideloadApp(Parcel in) {
        this.mAppInfo = (AppInfo) in.readParcelable(AppInfo.class.getClassLoader());
        this.mUri = (Uri) in.readParcelable(Uri.class.getClassLoader());
    }
}
